<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var money = 0;
        while (true) {
            var num = parseInt(prompt('请输入你想操作类型' + '\n' + '1.存钱' + '\n' + '2.取钱' + '\n' + '3.查询余额' + '\n' + '4.退出'));
            if (num === 1) {
                var save = parseInt(prompt("当前额度:" + money + '\n' + '需要存入:'))
                money = money + save
            } else if (num === 2) {
                var draw = parseInt(prompt('当前额度:' + money + '\n' + '需要取出:'))
                if (draw > money) {
                    alert('你有个屁的钱')
                    continue
                }
                money = money - draw
            } else if (num === 3) {
                alert('你的余额是:' + money)
            } else {
                alert('卡被吞了...')
                continue
            }

        }
    </script>
</body>

</html>